import { whRequest } from "./request";

export interface LoginModel {
	username: string;
	password: string;
}

export interface LoginResultModel {
	accessToken: string;
	expiresAt: number;
}

export interface LoginResult {
	code?: number;
	data?: LoginResultModel;
	message?: string;
}

export function apiLogin(data: LoginModel): Promise<LoginResult> {
	return whRequest({ data, url: "/whManager/login", method: "post" });
}
